/* =========================================================
   Т-Доход — design tokens
   Color   #FFDD2D yellow (brand) · #0F0F0D ink · #F4F4F1 fog
           #FFFFFF paper · #00B84A gain · #6E6E72 mute
   Type    Unbounded (display, bold/rounded) + Inter (body/UI)
   ========================================================= */

:root {
  --yellow: #FFDD2D;
  --yellow-deep: #F2C900;
  --ink: #0F0F0D;
  --fog: #F4F4F1;
  --paper: #FFFFFF;
  --gain: #00B84A;
  --mute: #6E6E72;
  --line: #E7E7E3;

  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-l: 28px;
  --radius-m: 20px;
  --radius-s: 12px;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--yellow);
  padding: 16px 34px;
  box-shadow: 0 10px 24px rgba(15,15,13,.18);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15,15,13,.24);
}

.btn--primary:active { transform: translateY(0); }

/* ---------- Topbar / banner ---------- */

.topbar {
  padding: 18px 24px;
}

.topbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Баннер: крупный, но целиком (contain) — логотип не обрезается */
.topbar__banner {
  height: 148px;
  width: auto;
  max-width: 420px;
  object-fit: contain;
}

@media (max-width: 640px) {
  .topbar__banner {
    height: 104px;
    max-width: 300px;
  }
}

.topbar__banner--empty { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 0;
}

.hero__blob {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: var(--yellow);
  border-radius: 44% 56% 65% 35% / 45% 40% 60% 55%;
  z-index: 0;
  opacity: .9;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px 0 40px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 18px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  max-width: 780px;
  width: 100%;
  overflow-wrap: break-word;
}

.hero__title-accent {
  display: inline-block;
  background: var(--ink);
  color: var(--yellow);
  padding: 0 14px;
  border-radius: 14px;
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero__lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero__cta { margin-bottom: 56px; }

/* Signature: живая карточка расчёта */

.calc-card {
  background: var(--paper);
  border-radius: var(--radius-l);
  padding: 28px 30px 30px;
  max-width: 380px;
  box-shadow: 0 24px 50px rgba(15,15,13,.10);
  border: 1px solid var(--line);
}

.calc-card__tag {
  display: inline-block;
  background: var(--fog);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.calc-card__label {
  color: var(--mute);
  font-size: 14px;
  margin-bottom: 6px;
}

.calc-card__label--small { font-size: 13px; }

.calc-card__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.calc-card__row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.calc-card__sub {
  font-weight: 700;
  font-size: 16px;
}

.calc-card__sub--profit { color: var(--gain); }

/* ---------- About / feature grid ---------- */

.about {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 96px 24px 20px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 36px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--mute);
  font-size: 17px;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 44px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 28px 26px;
}

.feature-card--dark {
  background: var(--ink);
  color: var(--fog);
  border-color: var(--ink);
}

.feature-card--dark .feature-card__text { color: #B9B9B6; }
.feature-card--dark .feature-card__fields li { border-color: #2A2A27; color: #D9D9D6; }
.feature-card--dark .feature-card__icon { background: var(--yellow); color: var(--ink); }

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--fog);
  color: var(--ink);
}

.feature-card__icon svg { width: 22px; height: 22px; }

.feature-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 10px;
}

.feature-card__text {
  color: var(--mute);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 20px;
}

.feature-card__fields {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-card__fields li {
  font-size: 13.5px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--mute);
}

.feature-card__fields li:first-child { border-top: none; }

/* ---------- Perks ---------- */

.perks {
  max-width: var(--wrap);
  margin: 40px auto 0;
  padding: 0 24px;
}

.perks__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 36px;
}

.perk {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.perk__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.perk p {
  margin: 0;
  color: var(--mute);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ---------- Final CTA ---------- */

.cta-final {
  max-width: var(--wrap);
  margin: 90px auto 100px;
  padding: 0 24px;
  text-align: center;
}

.cta-final__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 28px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 24px 40px;
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--mute);
}

.footer__policy-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px 0;
}

/* ---------- Privacy policy modal ---------- */

.policy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,13,.46);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 100;
}

.policy-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.policy-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 86vh;
  background: var(--paper);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(24px);
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}

@media (min-width: 720px) {
  .policy-overlay { align-items: center; }
  .policy-dialog { border-radius: var(--radius-l); max-height: 82vh; }
}

.policy-overlay.is-open .policy-dialog { transform: translateY(0); }

.policy-dialog__header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  z-index: 2;
}

.policy-dialog__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0;
}

/* Крестик закрытия — всегда виден поверх текста */
.policy-dialog__close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: var(--fog);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease;
}

.policy-dialog__close:hover { background: var(--yellow); }

.policy-dialog__close svg { width: 16px; height: 16px; }

.policy-dialog__body {
  overflow-y: auto;
  padding: 24px 26px 40px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #2B2B29;
}

.policy-dialog__body h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  margin: 26px 0 8px;
}

.policy-dialog__body h3:first-child { margin-top: 0; }

.policy-dialog__body p { margin: 0 0 12px; }

.policy-dialog__body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.policy-dialog__body li { margin-bottom: 6px; }

.policy-dialog__generated {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 12.5px;
}

body.policy-open { overflow: hidden; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .perks__grid { grid-template-columns: 1fr; padding: 28px; }
  .hero__blob { width: 460px; height: 460px; top: -180px; right: -200px; }
}

@media (max-width: 480px) {
  .hero__inner { padding-top: 28px; }
  .calc-card { max-width: 100%; }
}
